﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Globalization;

namespace WcfServiceWeekdayExtractor.REST
{
    public class ServiceWeekday : IServiceWeekday
    {
        public string GetWeekday(string dayString, string monthString, string yearString)
        {
            int day = int.Parse(dayString);
            int month = int.Parse(monthString);
            int year = int.Parse(yearString);

            CultureInfo bulgarianCulture = new CultureInfo("bg-BG");
            DateTime date = new DateTime(year, month, day);
            string dayOfTheWeek = date.ToString("dddd", bulgarianCulture);

            return dayOfTheWeek;
        }
    }
}
